/*******************************************************************************
 * Copyright (c) 2024 The University of York.
 *
 * This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License 2.0
 * which is available at https://www.eclipse.org/legal/epl-2.0/
 *
 * SPDX-License-Identifier: EPL-2.0
 *******************************************************************************/
package org.eclipse.epsilon.eol.dap;

public class DeltaLocationConverter implements LocationConverter {
	private final int fromLocalToRemoteAdd;

	public DeltaLocationConverter(int fromLocalToRemoteAdd) {
		this.fromLocalToRemoteAdd = fromLocalToRemoteAdd;
	}

	@Override
	public int fromRemoteToLocal(int remote) {
		return remote - fromLocalToRemoteAdd;
	}

	@Override
	public int fromLocalToRemote(int local) {
		return local + fromLocalToRemoteAdd;
	}
}